list3 = [
    {"name": "alex", "hobby": "抽烟"},
    {"name": "alex", "hobby": "喝酒"},
    {"name": "alex", "hobby": "烫头"},
    {"name": "alex", "hobby": "Massage"},
    {"name": "wusir", "hobby": "喊麦"},
    {"name": "wusir", "hobby": "街舞"},
    {"name": "wusir", "hobby": "出差"},
]
l1=[]
for i in list3:
    for j in l1:
        if i['name'] == j['name']:
            j['hobby_list'].append(i['hobby'])
            break
    else:
        l1.append({'name':i['name'],'hobby_list':[i['hobby'],]})
print(l1)
x=['a','b','c']
l=[0,1,2,3,4,5,6]
l1=iter(l)
l2=[]
for j in range(2):
    dic = {}
    for i in zip(x,l1):
        dic[i[0]]=i[-1]
    l2.append(dic)
print(l2)

x=['a','b','c']
l=(i for i in range(6))
l2=[]
for j in range(2):
    dic={}
    for z in zip(x,l):
        dic[z[0]]=z[-1]
    l2.append(dic)
print(l2)



